<template>
  <div>
    <el-table
      :data="tableData"
      row-key="procode"
      border
      style="width: 100%"
      max-height="500"
      :row-style="tableStyle"
      :header-row-style="headerStyle"
      highlight-current-row
      @row-click="clickProject"
    >
      <el-table-column align="center" prop="procode" label="编号" width="100" />
      <el-table-column
        align="center"
        prop="proshortname"
        label="简称"
        width="150"
      />
      <el-table-column align="center" prop="proname" label="全称" />
      <el-table-column
        align="center"
        prop="stageName"
        label="阶段"
        width="150"
      />
      <!-- <el-table-column
        align="center"
        prop="proprovince"
        label="省份"
        width="150"
      /> -->
      <el-table-column align="center" prop="procity" label="城市" width="150" />
      <!-- <el-table-column align="center" prop="proaddress" label="地址" /> -->
    </el-table>
  </div>
</template>

<script>
import { getStageProjectListApi } from "@/api/index";
export default {
  props: {
    tableData: {
      type: Array,
      default: null,
    },
    open: {
      type: Function,
      default: null,
    },
  },
  data() {
    return {
      tableStyle: {
        background: "none",
        width: "150px",
      },
      headerStyle: {
        color: "black",
        fontSize: "16px",
      },
    };
  },
  mounted() {},
  methods: {
    clickProject(row, column, event) {
      console.log("行点击----->", row, column, event);
      this.open(row);
    },
  },
};
</script>

<style lang="scss" >
.el-table {
  /* border: 1px solid red; */
  background: #f5f6fa;
}

.has-gutter > tr > :last-child {
  /* background: red; */
}

.el-table__row:hover {
  cursor: pointer;
}

.el-table__body-wrapper {
  overflow-y: scroll;
}
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-thumb {
  border-radius: 10px;
  -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  opacity: 0.2;
  background: fade(rgb(78, 182, 214), 60%);
}
::-webkit-scrollbar-track {
  -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  border-radius: 0;
  background: fade(rgb(78, 182, 214), 30%);
}
</style>